/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-19 21:28:07
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-19 21:33:57
 */
import 'package:flutter/material.dart';
import 'package:flutter_data_center/model/alert/alert_model.dart';
import 'package:flutter_data_center/utills/color_utils.dart';
import 'package:flutter_svg/flutter_svg.dart';

class AlertItem extends StatelessWidget {
  const AlertItem({Key key, this.alert}) : super(key: key);
  final AlertModel alert;

  @override
  Widget build(BuildContext context) => ListTile(
        isThreeLine: false,
        minLeadingWidth: 30,
        leading: Container(
          width: 30,
          height: 30,
          padding: EdgeInsets.all(5),
          decoration: BoxDecoration(
              color: gColor("#FCEDD"), borderRadius: BorderRadius.circular(8)),
          child: SvgPicture.asset("assets/icon/icon_camera.svg"),
        ),
        title: Text(
          alert.description,
          style: TextStyle(
            color: Colors.black,
            fontSize: 16,
          ),
        ),
        subtitle: Text(
          alert.address,
          style: TextStyle(
            color: gColor('#939393'),
            fontSize: 12,
          ),
        ),
        trailing: Text(
          alert.time,
          style: TextStyle(
            fontSize: 12,
            color: gColor("#D36666"),
          ),
        ),
      );
}
